<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link href="css/normalize.css" rel="stylesheet">
    <link href="{{asset('css/set.css')}}" rel="stylesheet">
    <script type="text/javascript" src="js/jquery-2.1.0.js"></script>
</head>

<body>
    <nav>
        <div class="nav-brand left">
        </div>
        <ul class="nav-left left">
            <li><button><a href="http://test.cn">首页</a href=""></button></li>
            <li><button><a href="http://test.cn/ranking">排行榜</a href=""></button></li>
            <li><button><a href="http://test.cn/information">消息</a href=""></button></li>
        </ul>
        <div class="nav-form left">
            <input type="text" placeholder="搜索文章" @keyup="keydown">
            <span class="search" @click="bigsearch"></span>
        </div>
        <ul class="nav-right right">
            <li><a class="writing" href="http://test.cn/creat-page">写文章</a></li>
            <li>
                <a class="person dropdown" href="#">@{{user_name}}</a>
                <!-- 下拉菜单 -->
                <ul class="drop-menu">
                    <li><a href="#">用户中心</a></li>
                    <li><a href="http://test.cn/login">注销</a></li>
                </ul>
            </li>
        </ul>
    </nav>
    
    <main>
     <section class="left-c">
            <div class="author-img">
                <img src="images/author-img.png" alt="用户头像">
            </div>
            <ul class="func">
                <li><span class="grzl" href="#" @click="click_grazl">个人资料</span>
                <li>
                <li><span class="article" href="#" @click="click_article">文章管理</span></li>
                <li><span class="cgmg" href="#" @click="click_cgmg">更改密码</span></li>
            </ul>
        </section>
        <section class="right-c">
            <div class="page-one">
                <p class="title">用户中心</p>
                <dl>
                    <dt>学号：
                        <td>@{{user_info.account}}</td>
                    </dt>
                    <dt>昵称：
                        <td>@{{user_info.name}}</td>
                        <td><span class="chane-name-btn" @click="change_name_btn">修改昵称</span></td>
                    </dt>
                    <dt>文章数：
                        <td>@{{user_info.number}}</td>
                    </dt>
                    <dt>积分值：
                        <td>@{{user_info.rating}}</td>
                    </dt>
                    <dt>用户类型：
                        <td>@{{user_info.status==0?"普通用户":"管理员"}}</td>
                    </dt>
                </dl>
                <!-- 修改昵称 -->
                <div class="chage-name">
                    <p>请输入新的昵称</p>
                    <input class="new-name" type="text" @input="get_name($event)">
                    <div class="btn-row">
                        <button class="sure-btn" type="button" @click="sure_btn">确认</button>
                        <button class="detele-btn" type="button" @click="detele_btn">取消</button>
                    </div>
                </div>
            </div>
            <div class="page-tow">
                <p class="title-head">文章管理</p>
                <ul class="manage">
                    <li>
                        <span class="total under-line" @click="f_total($event)">全部(<b>@{{total_article}}</b>)</span>
                    </li>
                    <li>
                        <span class="checking" @click="f_checking($event)">审核中(<b>@{{checking_num}}</b>)</span>
                    </li>
                    <li>
                        <span class="none-pass" @click="f_none_pass($event)">未通过(<b>@{{none_pass_num}}</b>)</span>
                    </li>
                    <li>
                        <span class="draft-box" @click="f_draft_box($event)">草稿箱(<b>@{{draft_num}}</b>)</span>
                    </li>
                </ul>
                <div class="list-content">
                    <ul class="article-list" v-for="(item,index) of list_data">
                        <li class="item-one"><span>@{{item.title}}}</span></li>
                        <li class="item-tow">状态：<span>@{{check_status(item.status)}}</span></li>
                        <li class="item-tree">@{{slice(item.created_at)}}</li>
                        <li class="item-four">点赞数：<span>@{{item.like}}</span></li>
                        <li class="item-five">浏览量：<span>@{{item.view}}</span></li>
                        <li @click="change(item.id)"><a href="#">修改</a></li>
                    </ul>
                </div>
                <!-- 分页 -->
                <ul class="paging">
                    <li class="init-page">
                        <button type="button" @click="init">首页</button></li>
                    <li class="pre-page">
                        <button class="pre-btn" type="button" @click="pre">上一页</button></li>
                    <li class="current-page">@{{current_page}}</li>
                    <li class="next-page">
                        <button class="next-btn" type="button" @click="next">下一页</button></li>
                    <li class="end-page">
                        <button type="button" @click="end">尾页</button></li>
                    <li class="num-page">
                        <input id="jump-btn" type="text" value="1">
                    </li>
                    <li class="jump">
                        <button type="button" @click="jump">跳转</button></li>
                    <li class="total-page">一共有@{{per_page}}页</li>
                </ul>
            </div>
            <div class="page-tree">
                <div class="chage-secret">
                    <form>
                        <label for="orig-m">
                            原密码：<input class="orig-m" id="orig-m" type="password" @input="orig_mm($event)">
                        </label>
                        <label for="new-m">
                            新密码：<input class="new-m" id="new-m" type="password" @input="new_mm($event)">
                        </label>
                        <div class="btn-row">
                            <button type="button" @click="p3_sure">确认</button>
                            <button type="button" @click="p3_delete">取消</button>
                        </div>
                    </form>
                </div>
            </div>
        </section>
    </main>
    <footer>
        <p>Copyright © 成都东软学院 All Rights Reserved | 蜀ICP备12011972号</p>
    </footer>
    <script src="{{asset('js/vue.js')}}"></script>
    <script src="{{asset('js/set1.js')}}"></script>
</body>

</html>